package com.example.study.service;

import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 审核服务
 *
 * @author duckquan
 */
@Service
public class AuthInfoServiceImpl implements AuthInfoService {

    //审批信息，审核人Id+申请单Id
    private Map<String, Date> authMap = new HashMap<>();

    @Override
    public void auth(String userId, String orderId) {
        System.out.println("进入审批流程，审批人Id：" + userId);
        authMap.put(userId.concat(orderId), new Date());
    }

    @Override
    public Date queryAuthInfo(String userId, String orderId) {
        //key=审核人Id+审核单Id
        return authMap.get(userId.concat(orderId));
    }

}
